<template>
  <div class="child2">
    <h3>子组件2 —— 我有{{toyNumber}}个玩具，我有{{book}}本书</h3>
    <button @click="$parent.n -= 3">干掉父亲3套房产</button>
  </div>
</template>

<script>

export default {
  name: 'Child2',
	data() {
		return {
			toyNumber:50,
			book:100
		}
	},
}
</script>

<style lang="less" scoped>
	.child2{
		margin-top: 20px;
		background-color: skyblue;
		padding: 20px;
		border-radius: 10px;
    box-shadow: 0 0 10px black;
	}
</style>
